import useLocalStorage from "../hooks/local-store-hook";

export default function CustomDatastoreHook() {
  const [name, setName] = useLocalStorage("name");
  return (
    <div>
      <h2>CustomDatastoreHook,localstorage的值: {name}</h2>
      <button onClick={(e) => setName("coderwhy")}>设置name</button>
    </div>
  );
}
